package com.swiftride.listener;

import com.swiftride.service.ILoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;


@Component
public class AutoAdminListener implements ApplicationListener<ContextRefreshedEvent> {

    @Autowired
    public ILoginService loginService;


    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        loginService.addAdmin();
    }
}
